# print(1 + 2 + 3)
# print(1 + 2 * 3)
# print(1 + 2 / 3)
import random

# print((67.5 + 89.0 + 12.9 + 32.2) / 4)

# avg = (67.5 + 89.0 + 12.9 + 32.2) / 4
# total = (67.5 - avg) ** 2 + (89.0 - avg) ** 2 + (12.9 -  avg) ** 2 + (32.2 - avg) ** 2
# ret = total / 3
# print(ret)

# a = 10
# b = a
# print(b)

# a = 20
# print(a)
# print(type(a))
# print(type(1))
# print(type(0.2))
# print(type("1"))

# f = '''My 'name' is "yuanshen"'''
# print(f)
# print(len(f))

# print(True)
# print(False)

# c1 = True
# c2 = False
# a:int = 1
# print(type(c1))
# print(type(c2))

# 08
# num = input('请输入一个整数: ')
# print(f'你输入的是{num}')

# a = input()
# b = input()
# c = input()
# print(type(a))
# a = int(a)
# b = int(b)
# c = float(c)
# print(f'a + b = {a + b + c}')

# print(255 % 5)
# print(10 > 2 and 1 < 2)
# print(1 > 2 or 2 > 1)
# print(not(1 < 2))

# print(2 > 3 and 10 / 0 == 1)
# print(2 < 3 or 10 / 0 == 1)

# print(1 | 2)
# print(1 & 2)
# print(1 ^ 2)

# print(True + 10)
# print(12222222222222222222222222222222222222222222222)
# b=111111111111111111111111111111111111111111111111111111
# b = int(b)
# print(b)

# a = input()
# print(bool(a))

# a = 1
# b = 1
# if a != b:
#     print(6)
# elif a == b:
#     print(7)
# else:
#     print(8)

# choice = input('输入 1 代表好好学习, 输入 2 代表躺平摆烂: ')
# if choice == '1':
#     print('你能找到好工作')
# elif choice == '2':
#     print('毕业即失业')
# else:
#     print('输入有误')

# a = input('请输入一个整数: ')
# a = int(a)
# if a == 1:
#     print('1111')
#     print("2222")

# a = input()
# b = input()
# if a == '1':
#     if b == '2':
#         print('a')
#     print('b')
# print('c')

# while(True):
#     a = int(input('请输入一个整数: '))
#     if a % 2 == 0:
#         print('偶数')
#     else:
#         print('奇数')

# a = int(input('请输入一个整数: '))
# if a > 0:
#     print('正数')
# elif a < 0:
#     print('负数')
# else :
#     print('0')

# a = int(input('请输入一个年份: '))
# if (a % 4 == 0 and a % 100 != 0) or a % 400 == 0:
#     print('闰年')
# else:
#     print('平年')
# a:int = 1
# a = 10
# while a > 0:
#     print(a)
#     a-=1

# a = 0
# while a < 60:
#     a += random.randint(1, 100)
#     print(a)

# num = 1
# Sum = 0
# while num <= 100:
#     Sum += num
#     num += 1
# print(Sum)

# for i in range(1, 6):
#     if i== 3:
#         continue
#         # pass
#     print(f'吃第{i}包子')

# for i in range(1, 6):
#     if i == 3:
#         break
#     print(f'吃了{i}个包子')

# theSum = 0
# count:int = 0
# while True:
#     num = input("请输入一个数字：")
#     if num == ';':
#         break
#     num = float(num)
#     theSum += num
#     count += 1
# print(f'平均值为{theSum / count}')





n = int(input("输入一个3位数："))
if n < 100 or n > 999:
    print('输入错误')
    exit(0)
Sum = 0
tmp = n
while n != 0:
    a = n % 10
    Sum += a * a * a
    n //= 10
if Sum == tmp:
    print(f'{tmp}是水仙数')
else:
    print(f'{tmp}不是水仙数')





















